package com.education.teach.di.module;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import com.education.teach.mvp.contract.ExamContract;
import com.education.teach.mvp.model.ExamModel;


@Module
public class ExamModule {
    private ExamContract.View view;

    /**
     * 构建ExamModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public ExamModule(ExamContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    ExamContract.View provideExamView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    ExamContract.Model provideExamModel(ExamModel model) {
        return model;
    }
}